<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>管理员列表</title>
    <!-- import CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
    <link rel="stylesheet" href="css/main.css">
    <style>

    </style>
</head>
<!--只修改mian标签内容-->
<!--这里是管理员账号页面-->
<!--姓名：           -->
<body>
<div id="app">
    <el-container>
        <el-header>不动</el-header>
        <el-container>
            <el-aside width="200px">
                <el-menu @select="handleSelect" active-text-color="orange" default-active="2-1">
                    <img src="imgs/icon.png" style="margin-top: 10px" width="150px">
                    <el-divider></el-divider>
                    <el-menu-item index="1"><i class="el-icon-s-platform">数据统计分析</i></el-menu-item>
                    <el-submenu index="2">
                        <template slot="title">
                            <i class="el-icon-s-custom">管理员账号</i>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="2-1">管理员列表</el-menu-item>
                            <el-menu-item index="2-2">添加管理员</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-menu-item index="3"><i class="el-icon-user-solid"> 用户账号</i></el-menu-item>
                    <el-submenu index="4">
                        <template slot="title">
                            <i class="el-icon-video-camera"> 轮播图管理</i>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="4-1">轮播图列表</el-menu-item>
                            <el-menu-item index="4-2">添加轮播图</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="5">
                        <template slot="title">
                            <i class="el-icon-s-promotion"> 文章管理</i>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="5-1">文章列表</el-menu-item>
                            <el-menu-item index="5-2">发布文章</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="6">
                        <template slot="title">
                            <i class="el-icon-chat-line-round"> 评论管理</i>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="6-1">管理员评论</el-menu-item>
                            <el-menu-item index="6-2">用户评论</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-menu-item index="7"><i class="el-icon-setting"> 个人设置</i></el-menu-item>
                </el-menu>
            </el-aside>

            <!--只修改mian标签内容-->
            <el-main>
                <h1>员工姓名
                    <el-input style="height: 30px;width: 300px" type="text" placeholder="请输入员工姓名"></el-input>
                    <el-button type="primary" icon="el-icon-search">搜索</el-button>
                </h1>
                <div style="text-align: right">
                    <el-button type="primary">添加员工</el-button>
                </div>
                <template>
                    <el-table :data="tableData" border style="width: 100%">
                        <el-table-column prop="date" label="序号" align="center" width="50px"></el-table-column>
                        <el-table-column prop="name" label="员工姓名" align="center" width="100px"></el-table-column>
                        <el-table-column prop="account" label="账号" align="center"></el-table-column>
                        <el-table-column prop="number" label="手机号" align="center"></el-table-column>
                        <el-table-column prop="state" label="账号状态" align="center"></el-table-column>
                        <el-table-column prop="recently" label="最近操作时间" align="center"></el-table-column>
                        <el-table-column label="操作" align="center">
                            <template slot-scope="scope">
                                <el-button size="mini"
                                           @click="handleEdit(scope.$index, scope.row)">修改
                                </el-button>
                                <el-button size="mini" type="danger"
                                           @click="handleDelete(scope.$index, scope.row)">删除
                                </el-button>
                            </template>
                        </el-table-column>
                        <el-table-column prop="switch" label="状态" header-align="center" width="80px">
                            <template slot-scope="scope">
                                <el-switch v-model="scope.row.isAdmin"></el-switch>
                            </template>
                        </el-table-column>
                    </el-table>
                </template>
            </el-main>
        </el-container>
    </el-container>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
    let v = new Vue({
        el: "#app",
        data: function () {
            return {
                currentIndex: "1",
                tableData: [{
                    date: '1',
                    name: '王小虎',
                    account: "111111",
                    number: "13271231111",
                    state: "在线",
                    recently: "2023-08-09 00:00:00",
                }, {
                    date: '2',
                    name: '王小虎',
                    account: "222222",
                    number: "13271232222",
                    state: "在线",
                    recently: "2023-08-09 12:12:12"
                }, {
                    date: '3',
                    name: '王小虎',
                    account: "333333",
                    number: "13271233333",
                    state: "离线",
                    recently: "2023-08-09 11:12:34"
                }, {
                    date: '4',
                    name: '王小虎',
                    account: "444444",
                    number: "13271234444",
                    state: "离线",
                    recently: "2023-08-09 23:22:54"
                }, {
                    date: '5',
                    name: '王小虎',
                    account: "555555",
                    number: "13271235555",
                    state: "在线",
                    recently: "2023-08-09 18:21:34"
                }, {
                    date: '6',
                    name: '王小虎',
                    account: "666666",
                    number: "13271236666",
                    state: "在线",
                    recently: "2023-08-09 19:32:23"
                }, {
                    date: '7',
                    name: '王小虎',
                    account: "777777",
                    number: "13271237777",
                    state: "离线",
                    recently: "2023-08-09 20:22:54"
                }, {
                    date: '8',
                    name: '王小虎',
                    account: "888888",
                    number: "13271238888",
                    state: "在线",
                    recently: "2023-08-09 09:32:12"
                }, {
                    date: '9',
                    name: '王小虎',
                    account: "999999",
                    number: "13271239999",
                    state: "在线",
                    recently: "2023-08-09 14:21:43"
                },]
            }
        },
        methods: {
            handleSelect(key, keyPath) {
                v.currentIndex = key;
                console.log(key);
            }
        }
    })
</script>
</html>